#include "config_main.h"
#ifdef DDENN_INS_GARMIN_GTX_327
/*
 * ins_garmin_gtx_327.h
 *
 *  Created on: 06.06.2009
 *      Author: Admin
 */

#ifndef INS_GARMIN_GTX_327_H_
#define INS_GARMIN_GTX_327_H_

#include "config_ins_garmin_gtx_327.h"

#include <XPLMDataAccess.h>

#include <XPLMUtilities.h>
#include "xplane_tools.h"
#include "tools.h"

/**************************************************************************************/
//
//          it provides ddenn/instruments/garmin_gtx_327/
//
/*************************************************************************************/
namespace DdennGarminGtx327{

enum GarminGtx327RightFunction{off,altitude_fl,altitude_feets,altitude_meters,
	flight_time,count_up,count_down
};
extern GarminGtx327RightFunction RightFunction;
extern int DDennGarminGtxPower;
extern int TransponderCode;
extern int TransponderCodeInputIndicator;
extern int TimerDownInputIndicator;
/* have values:
 * 0-off
 * 1- altitude in flight levels; 2- altitude in feets 3; altitude in meters;
 * 4- flight time; 5-count up timer; 6-count down timer
 *
 */
extern bool TimerDownExpired;
extern int _fake_numbers[9];

void RegisterDdennGarminGtx327();
void UnregisterDdennGarminGtx327();

bool IsPowered();
int GetInsGarminGtx327Altitude_meters ( void *               inRefcon);
int GetInsGarminGtx327Altitude_feets ( void *               inRefcon);
int GetInsGarminGtx327Altitude_fl ( void *               inRefcon);
int GetInsGarminGtx327Vertical_Speed ( void *               inRefcon);
int GetInsGarminGtx327TransponderCodeInputIndicator ( void *               inRefcon);
int GetInsGarminGtx327TimerDownInputIndicator ( void *               inRefcon);
int GetInsGarminGtx327TimerDownInput ( void *               inRefcon);
int GetInsGarminGtx327TimerDownExpired ( void *               inRefcon);
int GetInsGarminGtx327TimerDownHours ( void *               inRefcon);
int GetInsGarminGtx327TimerDownMinutes ( void *               inRefcon);
int GetInsGarminGtx327TimerDownSeconds ( void *               inRefcon);
int GetInsGarminGtx327TimerUpHours ( void *               inRefcon);
int GetInsGarminGtx327TimerUpMinutes ( void *               inRefcon);
int GetInsGarminGtx327TimerUpSeconds ( void *               inRefcon);
int GetInsGarminGtx327FlightTimeHours ( void *               inRefcon);
int GetInsGarminGtx327FlightTimeMinutes ( void *               inRefcon);
int GetInsGarminGtx327FlightTimeSeconds ( void *               inRefcon);
float GetInsGarminGtx327FlightTimeRaw ( void *               inRefcon);
void SetInsGarminGtx327FlightTimeRaw (void *   inRefcon,float  inValue);
int GetInsGarminGtx327TransponderCode ( void *               inRefcon);



int GetInsGarminGtx327ButtonMode ( void *               inRefcon);
void SetGtxGarminGtx327ButtonMode (void *   inRefcon,int  inValue);
int GetGtxGarminGtx327ButtonFunction( void *               inRefcon);
void SetGtxGarminGtx327ButtonFunction (void *   inRefcon,int  inValue);



//int GarminGtx327ButtonNumber (XPLMCommandRef inCommand, XPLMCommandPhase inPhase, void * inRefcon);
void GarminGtx327ButtonNumber (void *   inRefcon,int  inValue);
int ReturnDummyZero ( void *               inRefcon);
void GarminGtx327ButtonCLR(void *   inRefcon,int  inValue);

void GarminGtx327ButtonCRSR (void *   inRefcon,int  inValue);
void GarminGtx327ButtonPause (void *   inRefcon,int  inValue);


}
/**************************************************************************************/
//
//          end of ddenn/instruments/garmin_gtx_327/
//
/*************************************************************************************/


#endif /* INS_GARMIN_GTX_327_H_ */
#endif
